package com.sskj.mine;

import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.lib.http.JsonCallBack;
import com.sskj.mine.bean.BuyRecordBean;
import com.sskj.mine.http.HttpConfig;
import com.sskj.mine.presenter.BasePresenter;

public class BuyShellRecordPresenter extends BasePresenter<BuyShellRecordActivity> {

    public void getBuyRecordList() {
        OkGo.<HttpData<BuyRecordBean>>post(HttpConfig.BASE_URL + HttpConfig.BUYRECORD)
                .params("type", "recharge")
                .params("page", 1)
                .params("size", 10)
                .execute(new JsonCallBack<HttpData<BuyRecordBean>>(this) {
                    @Override
                    public void onSuccess(Response<HttpData<BuyRecordBean>> response) {
                        HttpData body = response.body();
                        if (body.status == HttpConfig.OK) {
//                            mView.updateUi(response.body().getData());
                        }
                    }
                });
    }
}
